﻿using DongFangGuoKai.WMSPlatform.Extensions;
namespace DongFangGuoKai.WMSPlatform.WebApi.Extensions
{
    public static class WebApplicationExtension
    {
        public static void InitEnter(this WebApplication app)
        {
            // Configure the HTTP request pipeline.
            app.UseSwaggerExtend("WMS");

            app.UseCorsExtend();

            app.UseAuthentication();    

            app.UseAuthorization(); 

        }

        public static void InitMap(this IEndpointRouteBuilder app)
        {
            app.MapControllers();
            //.RequireAuthorization()  

            app.MapGet("/app/Test", () =>
            {
                 
                return "AceProgram";
            });
        }
    }
}
